#ifndef NEWWINDOW_H
#define NEWWINDOW_H

#include <QWidget>
#include <QMenuBar>
#include <QDialog>
#include <qpushbutton.h>
#include <qlineedit.h>
#include "include/errorDialog.h"
#include "include/globalvariate.h"
#include "include/snowflake.h"



class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoginDialog(QWidget* parent = nullptr, Client** currentClient= nullptr);
    ~LoginDialog();

    //初始化页面
    void InitWindows();
    void RegisterIndex();

private slots:
    void onOpenLoginDialog();
    void onOpenRegisterDialog();

signals:
    void loginSuccess();


private:
    Client** currentClient;

    //声明界面组件变量
    QPushButton* loginButton;
    QPushButton* registerButton;
    QLineEdit* username;
    QLineEdit* password;
    QLineEdit* phone;
    QWidget* registerIndex;

};

#endif // NEWWINDOW_H
